<template>
  <div>
    <h1 class="title">{{ title }}</h1>
    <img v-for="image in images" :key="image" :src="image" alt />
  </div>
</template>

<script>
export default {
  async asyncData(context) {
    const { data } = await context.$axios.get('api/soft/info')
    console.log(context.req.url)
    return data
  },
  // SSR渲染头部
  head() {
    return {
      title: this.title,
      meta: [
        {
          hid: 'description',
          name: 'description',
          content: this.desc
        },
        {
          hid: 'keywords',
          name: 'keywords',
          content: this.keywords
        }
      ]
    }
  }
}
</script>

<style>
h1.title {
  font-size: 14px;
  padding: 10px 15px;
}
img {
  width: 100%;
  display: block;
}
</style>
